package Demo3;

import java.util.PriorityQueue;
import java.util.Scanner;

public class Main8 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        int len = in.nextInt();
        int[][] count = new int[len][len];
        for(int i = 0; i < len;i++) {
            for(int j = 0; j <= i;j++) {
                if(j == 0) {
                    count[i][j] = 1;
                }else {
                    count[i][j] = count[i - 1][j] + count[i - 1][j - 1];
                }
            }
        }

        for(int i = 0; i < len;i++) {
            for(int j = 0; j <= i;j++) {
                int num = count[i][j];
                if(num == 0) continue;
                int c = 0;
                int n = num;
                while(num > 0) {
                    c++;
                    num /= 10;
                }
                for(int k = 1; k <= 5 - c; k++) System.out.print(" ");
                System.out.print(n);
            }
            System.out.println();
        }
    }
}